package com.jn.rxjava.service;

import java.io.Serializable;
import java.util.List;

public class NewsResponse implements Serializable {
    private int error_code;
    private String reason;
    private Result result;

    public int getError_code() {
        return error_code;
    }

    public String getReason() {
        return reason;
    }

    public Result getResult() {
        return result;
    }

    public static class Result implements Serializable {
        private String stat;
        private List<Data> data;

        public String getStat() {
            return stat;
        }

        public List<Data> getData() {
            return data;
        }
        public static class Data implements Serializable {
            private String uniquekey;
            private String title;
            private String date;
            private String category;
            private String author_name;
            private String url;
            private String thumbnail_pic_s;
            private String is_content;

            // Getters
            public String getUniquekey() { return uniquekey; }
            public String getTitle() { return title; }
            public String getDate() { return date; }
            public String getCategory() { return category; }
            public String getAuthor_name() { return author_name; }
            public String getUrl() { return url; }
            public String getThumbnail_pic_s() { return thumbnail_pic_s; }
            public String getIs_content() { return is_content; }

            @Override
            public String toString() {
                return title; // 使 ListView 能够显示新闻标题
            }
        }
    }
}
